<?php
class DatemodsForm extends Zend_Form
{
    public function __construct($options = null)
    {
        parent::__construct($options);
        $this->setName('datemods');
        $id = new Zend_Form_Element_Hidden('id');
        $flickrid = new Zend_Form_Element_Text('flickrid');
        $flickrid->setLabel('Flickr User ID')
            ->setRequired(true)
            ->addFilter('StripTags')
            ->addFilter('StringTrim')
            ->addValidator('NotEmpty')
            ->setDescription('Enter your Flickr user id or the id of the collection you want to update dates for.');
        
        $year = new Zend_Form_Element_Text('year');
        $year->setLabel('Year To Fetch')
            ->setRequired(false)
            ->addFilter('StripTags')
            ->addFilter('StringTrim')
            ->addValidator('NotEmpty')
            ->setDescription('Because getting photo info is very time consuming, enter a year to limit the search by date taken in that year. If left blank, we will search the whole collection.');

        $timezoneoptions = array (
            "-12.0"=>"(GMT -12:00) Eniwetok, Kwajalein",
            "-11.0"=>"(GMT -11:00) Midway Island, Samoa",
            "-10.0"=>"(GMT -10:00) Hawaii",
            "-9.0"=>"(GMT -9:00) Alaska",
            "-8.0"=>"(GMT -8:00) Pacific Time (US &amp; Canada)",
            "-7.0"=>"(GMT -7:00) Pacific Time Daylight Savings, Mountain Time (US &amp; Canada)",
            "-6.0"=>"(GMT -6:00) Mountain Time Daylight Savings, Central Time (US &amp; Canada), Mexico City",
            "-5.0"=>"(GMT -5:00) Central Time Daylight Savings, Eastern Time (US &amp; Canada), Bogota, Lima",
            "-4.0"=>"(GMT -4:00) Eastern Time Daylight Savings, Atlantic Time (Canada), Caracas, La Paz",
            "-3.5"=>"(GMT -3:30) Newfoundland",
            "-3.0"=>"(GMT -3:00) Brazil, Buenos Aires, Georgetown",
            "-2.0"=>"(GMT -2:00) Mid-Atlantic",
            "-1.0"=>"(GMT -1:00 hour) Azores, Cape Verde Islands",
            "0.0"=>"(GMT) Western Europe Time, London, Lisbon, Casablanca",
            "1.0"=>"(GMT +1:00 hour) Brussels, Copenhagen, Madrid, Paris",
            "2.0"=>"(GMT +2:00) Kaliningrad, South Africa",
            "3.0"=>"(GMT +3:00) Baghdad, Riyadh, Moscow, St. Petersburg",
            "3.5"=>"(GMT +3:30) Tehran",
            "4.0"=>"(GMT +4:00) Abu Dhabi, Muscat, Baku, Tbilisi",
            "4.5"=>"(GMT +4:30) Kabul",
            "5.0"=>"(GMT +5:00) Ekaterinburg, Islamabad, Karachi, Tashkent",
            "5.5"=>"(GMT +5:30) Bombay, Calcutta, Madras, New Delhi",
            "5.75"=>"(GMT +5:45) Kathmandu",
            "6.0"=>"(GMT +6:00) Almaty, Dhaka, Colombo",
            "7.0"=>"(GMT +7:00) Bangkok, Hanoi, Jakarta",
            "8.0"=>"(GMT +8:00) Beijing, Perth, Singapore, Hong Kong",
            "9.0"=>"(GMT +9:00) Tokyo, Seoul, Osaka, Sapporo, Yakutsk",
            "9.5"=>"(GMT +9:30) Adelaide, Darwin",
            "10.0"=>"(GMT +10:00) Eastern Australia, Guam, Vladivostok",
            "11.0"=>"(GMT +11:00) Magadan, Solomon Islands, New Caledonia",
            "12.0"=>"(GMT +12:00) Auckland, Wellington, Fiji, Kamchatka");
            
        $timezone = new Zend_Form_Element_Select('timezone');
        $timezone->setLabel('Timezone')
            ->setRequired(true)
            ->addMultiOptions($timezoneoptions)
            ->setDescription('Choose your timezone. It should be the same as your camera\'s setting.');

        $submit = new Zend_Form_Element_Submit('submit');
        $submit->setAttrib('id', 'submitbutton');
        $this->addElements(array($id, $flickrid, $year, $timezone, $submit));
    }
}
?>